﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace DataSetGenTest
{
    internal static class DataUtil
    {
        public static void Fill(SqlConnection cnn, DataTable dataTable)
        {
            using (var command = cnn.CreateCommand())
            {
                command.CommandText = "select * from " + dataTable.TableName;
                using (var dataAdapter = new SqlDataAdapter(command))
                {
                    dataAdapter.Fill(dataTable);
                }
            }
        }
    }
}
